//
//  ZSBMywardInfo.m
//  HCNewGoldFinger
//
//  Created by hugh on 16/4/4.
//  Copyright © 2016年 zjhcsoftios. All rights reserved.
//

#import "ZSBMyRewardInfo.h"

@implementation ZSBMyRewardInfo

+ (instancetype)modelObjectWithDictionary:(NSDictionary *)dict
{
    
    ZSBMyRewardInfo *info = [[ZSBMyRewardInfo alloc] init];
    info.availableDate = dict[@"availableDate"];
    info.createDate = dict[@"createDate"];
    info.desc =dict[@"desc"];
    info.desce =dict[@"desce"];
    info.detailCount = [dict[@"detailCount"] integerValue];
    info.orderCount = [dict[@"orderCount"] integerValue];
    info.distributionCount = [dict[@"distributionCount"] integerValue];
    info.topicId = dict[@"topicId"];
    info.orderId = dict[@"orderId"];

    info.projectId =dict[@"projectId"] ;

    info.topicName = dict[@"topicName"];
    info.name = dict[@"name"];
    info.logId = [dict[@"logId"] integerValue];
    info.tradeCount = [dict[@"tradeCount"] integerValue];

    
    
    info.commission = dict[@"commission"] ;
    info.content = dict[@"content"];
    info.dataMonth = dict[@"dataMonth"];
    info.detailId = dict[@"detailId"];
    info.status = dict[@"status"];
    info.statusIosIcon = dict[@"statusIosIcon"];
    info.iosIcon = dict[@"iosIcon"];
    info.tradeOrderNum = dict[@"tradeOrderNum"];
    info.qdbz = [dict[@"qdbz"] integerValue];
    info.type = dict[@"type"];
    info.zpbz = [dict[@"zpbz"] integerValue];
    info.paySeqId =dict[@"paySeqId"];
    info.ACCT_NAME_DES = dict[@"ACCT_NAME_DES"];
    info.ACCT_CODE_DES =dict[@"ACCT_CODE_DES"];
    info.baseMount =dict[@"baseMount"];
    info.distributeStatus = dict[@"distributeStatus"];
    info.viewXjgUrl =dict[@"viewXjgUrl"];
    info.baoFlag = [dict[@"baoFlag"] boolValue];
    info.tiFlag = [dict[@"tiFlag"] boolValue];
    info.tuoFlag =[dict[@"tuoFlag"] boolValue];
    info.zpHdImageFlag = dict[@"zpHdImageFlag"];
    info.zpRemarkFlag = [dict[@"zpRemarkFlag"] boolValue];

    NSArray *customerInfoVO = dict[@"customerInfoVO"];
    
    NSMutableArray *dateList = [[NSMutableArray alloc] init];

    if ([customerInfoVO isKindOfClass:[NSArray class]]) {
        for (NSDictionary *dic in customerInfoVO) {
            [dateList addObject:[ZSBMyRewardInfo modelObjectWithDictionary:dic]];
        }
    }
    info.customerInfoVO = dateList;
    
    NSArray *result = dict[@"result"];
    
    NSMutableArray *dateListresult = [[NSMutableArray alloc] init];
    
    if ([result isKindOfClass:[NSArray class]]) {
        for (NSDictionary *dic in result) {
            [dateListresult addObject:[ZSBMyRewardInfo modelObjectWithDictionary:dic]];
        }
    }
    info.result = dateListresult;
    
    
    
    
    NSArray *distributionList = dict[@"distributionList"];
    NSMutableArray *List = [[NSMutableArray alloc] init];
    if ([distributionList isKindOfClass:[NSArray class]]) {
        for (NSDictionary *dic in distributionList) {
            [List addObject:[ZSBMyRewardInfo modelObjectWithDictionary:dic]];
        }
    }
    info.distributionList = List;
    
    
    NSArray *orderList = dict[@"orderList"];
    NSMutableArray *orList = [[NSMutableArray alloc] init];
    if ([orderList isKindOfClass:[NSArray class]]) {
        for (NSDictionary *dic in orderList) {
            [orList addObject:[ZSBMyRewardInfo modelObjectWithDictionary:dic]];
        }
    }
    info.orderList = orList;
    
    return info;
}

@end
